package cn.com.zzz.taskpk.tcpip;

import java.io.IOException;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import cn.bbs.ba.socket.BAServerSocket;
import cn.bbs.ba.socket.BusCodeToBusBase;
import cn.com.zzz.taskpk.base.PKBusCodeToBus;

public class TcpipServer {
    /** LOG输出 */
    protected static Log _log = LogFactory.getLog(TcpipServer.class);
	public static void main(String args[]) {
		/**
		 * 开启服务
		 */
		BusCodeToBusBase bussness = new PKBusCodeToBus();
		try {
			TcpipServer._log.info("开启服务......");
			new BAServerSocket(bussness);
			TcpipServer._log.info("结束服务......");
		} catch (IOException e) {
			TcpipServer._log.error(e.toString());
			e.printStackTrace();
			System.gc();
			System.exit(-1);
		}
	}
}
